package co.yixiang.modules.system.domain;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.experimental.Accessors;
import lombok.Builder;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import javax.validation.constraints.*;
import java.time.LocalDateTime;
import java.io.Serializable;

/**
* @author db
* @date 2020-11-13
*/
@Data
@Accessors(chain = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("g_wallet")
public class Wallet implements Serializable {

    @TableId
    private Integer id;


    /** 账号 */
    private String account;


    /** 订单号 */
    private String target;


    /** 姓名 */
    private String name;


    /** 支付宝 */
    private String alipay;


    /** 微信 */
    private String wxpay;


    /** 银行卡 */
    private String bankpay;


    /** 创建时间 */
    private LocalDateTime addTime;


    /** 修改时间 */
    private LocalDateTime updateTimes;


    public void copy(Wallet source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
